java vs javascript performance